import { makeAutoObservable } from "mobx";
import { RootStore } from "..";

class UserStore {
  constructor(rootStore: RootStore) {
    this.rootStore = rootStore;
    makeAutoObservable(this, {}, { autoBind: true });
  }

  rootStore: RootStore;
  count = 1;

  get double() {
    return this.count * 2;
  }

  increment() {
    this.count += 1;
  }

  decrement() {
    this.count -= 1;
  }
}

export default UserStore;
